<template>
  <div class="test">{{ x }},{{ y }}</div>
</template>

<script>
import { watchEffect ,reactive} from "vue";
import { useMousePostion } from "@/common";

export default {
  setup() {
    const { x, y } = useMousePostion();
      const t={a:1},b=reactive(t);
      b.a++;
      watchEffect(() => {
          if (x.value === 100) {
              t.a++;
              console.log(t,b);
          }
      });
      return { x, y };
  }
};
</script>
